package org.idea.spring.common.error.controller;

import org.idea.spring.common.error.service.IBeanNameService;
import org.idea.spring.common.error.service.impl.SQLBeanNameServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author linhao
 * @Date created in 7:25 下午 2022/8/3
 */
@RestController
public class BeanNameController {

    @Autowired
    @Qualifier("beanNameServiceImpl")
    private IBeanNameService beanNameService;

    @Autowired
    @Qualifier("SQLBeanNameServiceImpl")
    //如果一个类名是以两个大写字母开头的，则首字母不变，其它情况下默认首字母变成小写
    private SQLBeanNameServiceImpl sqlBeanNameService;

    @GetMapping(value = "check-bean")
    public void checkBean(){
        System.out.println(beanNameService);
    }
}
